
<template>
   <div id="app">
      <div>
          <div class="stepTitle">德邦快递/物流：DPK331006562852</div>

        <div class="li1" v-for="(item,index) in stepInfo.list" :key="index">
          <div>
            <div :class="stepInfo.status>=index+1?'node':'node node2' ">{{item.node}}</div>
            <div class="pass">已通过</div>
            <div class="time">
              <span class="time_item">{{item.time}}</span>
              </div>

            <div :class="stepInfo.status>=index+2?'line lineActive':'line'" v-show="index!==stepInfo.list.length-1"></div>
          </div>
         <div class="two">
            <div class="name">{{item.name}}</div>
          </div>
        </div>
      </div>
    </div>

</template>

<script>
export default {
  name: 'steps',
  props: {
    // 传递步骤参数
    stepInfo: {
      type: Object,
      default: function () {
        return {
          list: [],
          step: 0
        }
      }
    }
  }
}
</script>

<style lang="scss" scoped>
 #app {
        margin-left: 150px;
      }
      .stepTitle{
        font-size: 16px;
        font-weight: bold;
        color: #4168E7;
        padding-bottom: 20px;
        padding-left: 20px;
      }
      .li1 {
        list-style: none;
        box-sizing: border-box;
        padding-left: 20px;
        position: relative;
      }

      .line {
        width: 2px;
        height: 100%;
        background-color: #e6e6e6;
        position: absolute;
        top: 11.225px;
        bottom: 0;
        left: -1px;
      }

      .lineActive {
        background-color: #0091ff;
      }

      .node::before {
        z-index: 1;
        content: "";
        background-color: #0091ff;
        width: 10px;
        height: 10px;
        color: #fff;
        position: absolute;
        border-radius: 50%;
        left: 0;
        top: 11.225px;
        transform: translate(-50%, -50%);
      }

      .node {
        font-size: 18px;
        line-height: 22.5px;
        font-weight: bold;
        color: #333333;
      }

      .node1 {
        color: #ff3b30;
      }

      .node1::before {
        background-color: #ff3b30;
      }

      .node2 {
        font-size: 16px;
        color: #CCCCCC;
      }

      .node2::before {
        background-color: #e6e6e6;
        width: 10px;
        height: 10px;
      }

      .name {
        width: 50px;
        padding: 10px 40px 20px 0;
        color: #333333;
      }
      .pass{
        width: 64px;
        height: 24px;
        background: rgba(18, 171, 98, 0.1);
        border-radius: 4px;
        position: absolute;
        font-size: 15px;
        left: 600px;
        top: 0;
        color: #12AB62;
        display: flex;
        justify-content: center;
        align-items: center;
      }
        .time {
        width: 100px;
        height: 50px;
        position: absolute;
        color: #666666;
        font-size: 16px;
        left: -123px;
        top: 0;
        .time_item{
          padding-left: 41px;
        }
      }

      .two {
        display: flex;
        align-items: baseline;
      }

      .advice {
        font-size: 14px;
        color: #999999;
        padding-bottom: 20px;
      }

      .li1:last-child .borderLeft {
        display: none;
      }

</style>
